package com.cjy.asserts;

/**
 * @author cheng jiye
 * @date 2020/3/27
 */
public class Assert {
    /**
     * 不能为空
     *
     * @param obj
     */
    public static void notNull(Object obj) {
        notNull(obj, "The argument must not be null");
    }


    /**
     * 不能为空
     *
     * @param obj
     * @param msg
     */
    public static void notNull(Object obj, String msg) {
        if (obj == null) {
            throw new RuntimeException(msg);
        }
    }

}
